﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using userInteractveControllers;

namespace WebInterface
{
    public partial class LoginGUI : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void loginCtrl_Authenticate(object sender, AuthenticateEventArgs e)
        {
            string gotoPage = null;
            LoginController loginController = new LoginController();
            gotoPage = loginController.login(loginCtrl.UserName, loginCtrl.Password);
            if (gotoPage != null)
            {
                Response.Redirect(gotoPage);
            }
        }

        protected void btnNewUser_Click(object sender, EventArgs e)
        {
            Response.Redirect("Public/CreateNewUser.aspx");
        }
    }
}
